package game.leon.seawar.server.handler.impl;

import game.leon.seawar.server.handler.FunParam;
import game.leon.seawar.vo.BaseVO;
import game.leon.engine.pattern.Fun;
import game.leon.seawar.vo.Vo;
import org.springframework.stereotype.Component;

/**
 * User: BianP
 * Date: 11-12-29
 */
@Component
public class LoginFun implements Fun<FunParam<Vo.LoginVO>, BaseVO> {
    private int seed = 1001;
    @Override
    public BaseVO exec(FunParam<Vo.LoginVO> data) {
        data.getSession().setUserId(seed++);
        return new Vo.EmptyVO();
    }
}
